function show_dialog(wording) {

    $("#dialog-message").html(wording);
    $("#dialog-message").dialog({
        modal: true,
        dialogClass: "no-close",
        closeOnEscape: false
    });
}

function show_alert(wording) {
    $("#dialog-message-button").html(wording);
    $("#dialog-message-button").dialog({
        modal: true,
        dialogClass: "no-close",
        buttons: {
            Ok: function() {
                $(this).dialog("close");
            }
        }
    });
}

function hide_dialog(wording) {
    $("#dialog-message").dialog("close");
    if (wording !== "") {
        $("#dialog-message-button").html(wording);
        $("#dialog-message-button").dialog({
            modal: true,
            dialogClass: "no-close",
            buttons: {
                Ok: function() {
                    $(this).dialog("close");
                }
            }
        });
    }
}